package br.com.upcoder.fguard.client.presenter.event;

import br.com.upcoder.fguard.client.shared.Budget;

import com.google.gwt.event.shared.GwtEvent;

public class AddDebtEvent extends GwtEvent<AddDebtEventHandler> {
	public static final Type<AddDebtEventHandler> TYPE = new Type<AddDebtEventHandler>();

	private Budget budget;

	public Budget getBudget() {
		return budget;
	}

	public void setBudget(Budget budget) {
		this.budget = budget;
	}

	public AddDebtEvent(Budget budget) {
		this.budget = budget;
	}

	@Override
	public Type<AddDebtEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(AddDebtEventHandler handler) {
		handler.onAddDebt(this);
	}
}
